// 原型式继承
function object(o) {
    function F() { }
    F.prototype = o
    return new F()
}

var person = {
    name: '胡少',
    colors:['red', 'green', 'blue']
}

var person1 = Object.create(person,{
    name: {
        value:'老胡'
    }
})
var person2 = Object.create(person,{
    name: {
        value:'胡老'
    }
})
person1.colors.push('pink')
console.log(person1.name);
console.log(person2.name);
console.log(person1.colors);
console.log(person2.colors);
